import {
  myRequest
} from '@/common/request.js'
// 第四个参数为true 的话是不用携带用户信息

// 抢购记录
export function adoptList(params) {
  return myRequest(
    '/api/trade/adoptList',
    'post',
    params,
  )
}


/**
 会员抢购预约
 */
export function homeAppoint(params) {
  return myRequest(
    '/api/index/appoint',
    'post',
    params,
  )
}

/**
 抢购列表数据渲染
 */
export function homeIndex(params) {
  return myRequest(
    '/api/index/index',
    'post',
    params,
  )
}


/**
抢购结果
 */
export function verifyMutual(params) {
  return myRequest(
    '/api/index/verifyMutual',
    'post',
    params,
  )
}

/**
上传凭证渲染
 */
export function uploadVoucherIndex(params) {
  return myRequest(
    '/api/trade/uploadVoucherIndex',
    'post',
    params,
  )
}

/**
确认订单渲染
 */
export function putConfirmOrderIndex(params) {
  return myRequest(
    '/api/trade/confirmOrderIndex',
    'post',
    params,
  )
}

/**
上传凭证
 */
export function uploadVoucher(params) {
  return myRequest(
    '/api/trade/uploadVoucher',
    'post',
    params,
  )
}

/**
确认收款
 */
export function submitConfirmOrder(params) {
  return myRequest(
    '/api/trade/confirmOrder',
    'post',
    params,
  )
}

/**
一键预约渲染
 */
export function getOneKeyInfo(params) {
  return myRequest(
    '/api/index/onekey',
    'post',
    params,
  )
}

/**
一键预约
 * @export
 * @returns
 */
export function putOneKey(params) {
  return myRequest(
    '/api/index/onekeypost',
    'post',
    params,
  )
}
